package org.ljy.forum6.model;

import com.fasterxml.jackson.annotation.JsonIgnore;
import com.fasterxml.jackson.annotation.JsonInclude;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import java.util.Date;
@ApiModel("用户信息")
@Data
public class User {
    private Long id;

    @ApiModelProperty("用户姓名")
    private String username;

    @JsonIgnore
    @ApiModelProperty("用户密码")
    private String password;

    @ApiModelProperty("用户昵称")
    private String nickname;

    @ApiModelProperty("用户电话")
    private String phoneNum;

    @ApiModelProperty("用户邮箱")
    private String email;

    @ApiModelProperty("用户性别")
    private Byte gender;

    @JsonIgnore
    private String salt;

    @JsonInclude(JsonInclude.Include.ALWAYS) // 不论任何情况都参与JSON序列化
    @ApiModelProperty("用户头像地址")
    private String avatarUrl;

    @ApiModelProperty("用户文章数量")
    private Integer articleCount;

    private Byte isAdmin;

    @ApiModelProperty("用户姓名")
    private String remark;

    //是否被禁言
    private Byte state;

    @JsonIgnore
    private Byte deleteState;

    private Date createTime;

    private Date updateTime;
}